package cn.com.cetccst.devicerestriction.ui;

import cn.com.cetccst.devicerestriction.BR;
import cn.com.cetccst.devicerestriction.R;
import cn.com.cetccst.devicerestriction.databinding.FragmentDeviceRestrictionBinding;
import cn.com.cetccst.uicomponents.binding.app.DataBindingConfig;
import cn.com.cetccst.uicomponents.binding.app.DataBindingFragment;

public class DeviceRestrictionFragment extends DataBindingFragment<FragmentDeviceRestrictionBinding> {
    private DeviceRestrictionViewModel viewModel;
    private DeviceRestrictionAdapter adapter;

    @Override
    protected void initViewModel() {
        viewModel = getFragmentScopeViewModel(DeviceRestrictionViewModel.class);
        adapter = new DeviceRestrictionAdapter(requireContext());
    }

    @Override
    protected DataBindingConfig getDataBindingConfig() {
        return new DataBindingConfig(R.layout.fragment_device_restriction, BR.viewmodel, viewModel)
                .addBindingParam(BR.adapter, adapter);
    }
}
